from django.db import models

class ServiceProvider(models.Model):
    name = models.CharField(max_length=200, unique=True)
    address = models.CharField(max_length=20)
    pubkey = models.CharField(max_length=2000)
    
    def __unicode__(self):
        return self.name

class File(models.Model):
    name = models.CharField(max_length=100, unique=True)
    author = models.CharField(max_length=100)
    description = models.CharField(max_length=200)
    sp = models.ForeignKey(ServiceProvider)
    
    def __unicode__(self):
        return self.name
